import React, {Component} from 'react';
import {connect} from 'react-redux'

import {getUserList} from '../../redux/actions'
import UsersList from '../../components/user-list/users-list'
class UserList extends Component {

    componentDidMount(){
        this.props.getUserList('user')
    }

    render() {
        return <UsersList userList={this.props.userList}></UsersList>
    }
}

export default connect(
    state => ({userList : state.userList}),
    {getUserList}
)(UserList) ;